package com.wnhoo.smartfishtank.api.data;

import java.io.Serializable;

/**
 * Created by MacBookAir on 15/4/13
 */
public class DataBLE implements Serializable {

    public static final int TYPE_PLUG = 0;
    public static final int TYPE_LIGHT = 1;


    private String name;
    private String id;
    private String des;
    private String status;
    private boolean online;
    private int type;
    private int rssi;


    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof DataBLE)) return false;
        DataBLE that = (DataBLE) o;
        if (!id.equals(that.id)) return false;
        return true;
    }

    @Override
    public int hashCode() {

        int result = id.hashCode();
        return result;
    }

    @Override
    public String toString() {
        return "DataBLE{" +
                "name='" + name + '\'' +
                ", id='" + id + '\'' +
                ", des='" + des + '\'' +
                ", status='" + status + '\'' +
                ", online=" + online +
                ", type=" + type +
                ", rssi=" + rssi +
                '}';
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public boolean isOnline() {
        return online;
    }

    public void setOnline(boolean online) {
        this.online = online;
    }

    public int getRssi() {
        return rssi;
    }

    public void setRssi(int rssi) {
        this.rssi = rssi;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getDes() {
        return des;
    }

    public void setDes(String des) {
        this.des = des;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }
}
